3.2.13 \(\int \frac {c+d x^2+e x^4+f x^6}{a+b x^2} \, dx\)

Optimal. Leaf size=100 \[ \frac {x \left (a^2 f-a b e+b^2 d\right )}{b^3}+\frac {\tan ^{-1}\left (\frac {\sqrt {b} x}{\sqrt {a}}\right ) \left (a^3 (-f)+a^2 b e-a b^2 d+b^3 c\right )}{\sqrt {a} b^{7/2}}+\frac {x^3 (b e-a f)}{3 b^2}+\frac {f x^5}{5 b} \]

________________________________________________________________________________________

Rubi [A]  time = 0.06, antiderivative size = 100, normalized size of antiderivative = 1.00, number of steps used = 3, number of rules used = 2, integrand size = 27, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.074, Rules used = {1810, 205} \begin {gather*} \frac {\tan ^{-1}\left (\frac {\sqrt {b} x}{\sqrt {a}}\right ) \left (a^2 b e+a^3 (-f)-a b^2 d+b^3 c\right )}{\sqrt {a} b^{7/2}}+\frac {x \left (a^2 f-a b e+b^2 d\right )}{b^3}+\frac {x^3 (b e-a f)}{3 b^2}+\frac {f x^5}{5 b} \end {gather*}

Antiderivative was successfully verified.

[In]

Int[(c + d*x^2 + e*x^4 + f*x^6)/(a + b*x^2),x]

[Out]

((b^2*d - a*b*e + a^2*f)*x)/b^3 + ((b*e - a*f)*x^3)/(3*b^2) + (f*x^5)/(5*b) + ((b^3*c - a*b^2*d + a^2*b*e - a^
3*f)*ArcTan[(Sqrt[b]*x)/Sqrt[a]])/(Sqrt[a]*b^(7/2))

Rule 205

Int[((a_) + (b_.)*(x_)^2)^(-1), x_Symbol] :> Simp[(Rt[a/b, 2]*ArcTan[x/Rt[a/b, 2]])/a, x] /; FreeQ[{a, b}, x]
&& PosQ[a/b]

Rule 1810

Int[(Pq_)*((a_) + (b_.)*(x_)^2)^(p_.), x_Symbol] :> Int[ExpandIntegrand[Pq*(a + b*x^2)^p, x], x] /; FreeQ[{a,
b}, x] && PolyQ[Pq, x] && IGtQ[p, -2]

Rubi steps

\begin {align*} \int \frac {c+d x^2+e x^4+f x^6}{a+b x^2} \, dx &=\int \left (\frac {b^2 d-a b e+a^2 f}{b^3}+\frac {(b e-a f) x^2}{b^2}+\frac {f x^4}{b}+\frac {b^3 c-a b^2 d+a^2 b e-a^3 f}{b^3 \left (a+b x^2\right )}\right ) \, dx\\ &=\frac {\left (b^2 d-a b e+a^2 f\right ) x}{b^3}+\frac {(b e-a f) x^3}{3 b^2}+\frac {f x^5}{5 b}+\frac {\left (b^3 c-a b^2 d+a^2 b e-a^3 f\right ) \int \frac {1}{a+b x^2} \, dx}{b^3}\\ &=\frac {\left (b^2 d-a b e+a^2 f\right ) x}{b^3}+\frac {(b e-a f) x^3}{3 b^2}+\frac {f x^5}{5 b}+\frac {\left (b^3 c-a b^2 d+a^2 b e-a^3 f\right ) \tan ^{-1}\left (\frac {\sqrt {b} x}{\sqrt {a}}\right )}{\sqrt {a} b^{7/2}}\\ \end {align*}

________________________________________________________________________________________

Mathematica [A]  time = 0.08, size = 98, normalized size = 0.98 \begin {gather*} \frac {x \left (15 a^2 f-5 a b \left (3 e+f x^2\right )+b^2 \left (15 d+5 e x^2+3 f x^4\right )\right )}{15 b^3}+\frac {\tan ^{-1}\left (\frac {\sqrt {b} x}{\sqrt {a}}\right ) \left (a^3 (-f)+a^2 b e-a b^2 d+b^3 c\right )}{\sqrt {a} b^{7/2}} \end {gather*}

Antiderivative was successfully verified.

[In]

Integrate[(c + d*x^2 + e*x^4 + f*x^6)/(a + b*x^2),x]

[Out]

(x*(15*a^2*f - 5*a*b*(3*e + f*x^2) + b^2*(15*d + 5*e*x^2 + 3*f*x^4)))/(15*b^3) + ((b^3*c - a*b^2*d + a^2*b*e -
 a^3*f)*ArcTan[(Sqrt[b]*x)/Sqrt[a]])/(Sqrt[a]*b^(7/2))

________________________________________________________________________________________

IntegrateAlgebraic [F]  time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \int \frac {c+d x^2+e x^4+f x^6}{a+b x^2} \, dx \end {gather*}

Verification is not applicable to the result.

[In]

IntegrateAlgebraic[(c + d*x^2 + e*x^4 + f*x^6)/(a + b*x^2),x]

[Out]

IntegrateAlgebraic[(c + d*x^2 + e*x^4 + f*x^6)/(a + b*x^2), x]

________________________________________________________________________________________

fricas [A]  time = 1.14, size = 236, normalized size = 2.36 \begin {gather*} \left [\frac {6 \, a b^{3} f x^{5} + 10 \, {\left (a b^{3} e - a^{2} b^{2} f\right )} x^{3} + 15 \, {\left (b^{3} c - a b^{2} d + a^{2} b e - a^{3} f\right )} \sqrt {-a b} \log \left (\frac {b x^{2} + 2 \, \sqrt {-a b} x - a}{b x^{2} + a}\right ) + 30 \, {\left (a b^{3} d - a^{2} b^{2} e + a^{3} b f\right )} x}{30 \, a b^{4}}, \frac {3 \, a b^{3} f x^{5} + 5 \, {\left (a b^{3} e - a^{2} b^{2} f\right )} x^{3} + 15 \, {\left (b^{3} c - a b^{2} d + a^{2} b e - a^{3} f\right )} \sqrt {a b} \arctan \left (\frac {\sqrt {a b} x}{a}\right ) + 15 \, {\left (a b^{3} d - a^{2} b^{2} e + a^{3} b f\right )} x}{15 \, a b^{4}}\right ] \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((f*x^6+e*x^4+d*x^2+c)/(b*x^2+a),x, algorithm="fricas")

[Out]

[1/30*(6*a*b^3*f*x^5 + 10*(a*b^3*e - a^2*b^2*f)*x^3 + 15*(b^3*c - a*b^2*d + a^2*b*e - a^3*f)*sqrt(-a*b)*log((b
*x^2 + 2*sqrt(-a*b)*x - a)/(b*x^2 + a)) + 30*(a*b^3*d - a^2*b^2*e + a^3*b*f)*x)/(a*b^4), 1/15*(3*a*b^3*f*x^5 +
 5*(a*b^3*e - a^2*b^2*f)*x^3 + 15*(b^3*c - a*b^2*d + a^2*b*e - a^3*f)*sqrt(a*b)*arctan(sqrt(a*b)*x/a) + 15*(a*
b^3*d - a^2*b^2*e + a^3*b*f)*x)/(a*b^4)]

________________________________________________________________________________________

giac [A]  time = 0.45, size = 106, normalized size = 1.06 \begin {gather*} \frac {{\left (b^{3} c - a b^{2} d - a^{3} f + a^{2} b e\right )} \arctan \left (\frac {b x}{\sqrt {a b}}\right )}{\sqrt {a b} b^{3}} + \frac {3 \, b^{4} f x^{5} - 5 \, a b^{3} f x^{3} + 5 \, b^{4} x^{3} e + 15 \, b^{4} d x + 15 \, a^{2} b^{2} f x - 15 \, a b^{3} x e}{15 \, b^{5}} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((f*x^6+e*x^4+d*x^2+c)/(b*x^2+a),x, algorithm="giac")

[Out]

(b^3*c - a*b^2*d - a^3*f + a^2*b*e)*arctan(b*x/sqrt(a*b))/(sqrt(a*b)*b^3) + 1/15*(3*b^4*f*x^5 - 5*a*b^3*f*x^3
+ 5*b^4*x^3*e + 15*b^4*d*x + 15*a^2*b^2*f*x - 15*a*b^3*x*e)/b^5

________________________________________________________________________________________

maple [A]  time = 0.00, size = 135, normalized size = 1.35 \begin {gather*} \frac {f \,x^{5}}{5 b}-\frac {a f \,x^{3}}{3 b^{2}}+\frac {e \,x^{3}}{3 b}-\frac {a^{3} f \arctan \left (\frac {b x}{\sqrt {a b}}\right )}{\sqrt {a b}\, b^{3}}+\frac {a^{2} e \arctan \left (\frac {b x}{\sqrt {a b}}\right )}{\sqrt {a b}\, b^{2}}-\frac {a d \arctan \left (\frac {b x}{\sqrt {a b}}\right )}{\sqrt {a b}\, b}+\frac {c \arctan \left (\frac {b x}{\sqrt {a b}}\right )}{\sqrt {a b}}+\frac {a^{2} f x}{b^{3}}-\frac {a e x}{b^{2}}+\frac {d x}{b} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

int((f*x^6+e*x^4+d*x^2+c)/(b*x^2+a),x)

[Out]

1/5*f*x^5/b-1/3/b^2*x^3*a*f+1/3/b*x^3*e+1/b^3*a^2*f*x-1/b^2*a*e*x+1/b*d*x-1/b^3/(a*b)^(1/2)*arctan(1/(a*b)^(1/
2)*b*x)*a^3*f+1/b^2/(a*b)^(1/2)*arctan(1/(a*b)^(1/2)*b*x)*a^2*e-1/b/(a*b)^(1/2)*arctan(1/(a*b)^(1/2)*b*x)*a*d+
1/(a*b)^(1/2)*arctan(1/(a*b)^(1/2)*b*x)*c

________________________________________________________________________________________

maxima [A]  time = 2.97, size = 94, normalized size = 0.94 \begin {gather*} \frac {{\left (b^{3} c - a b^{2} d + a^{2} b e - a^{3} f\right )} \arctan \left (\frac {b x}{\sqrt {a b}}\right )}{\sqrt {a b} b^{3}} + \frac {3 \, b^{2} f x^{5} + 5 \, {\left (b^{2} e - a b f\right )} x^{3} + 15 \, {\left (b^{2} d - a b e + a^{2} f\right )} x}{15 \, b^{3}} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((f*x^6+e*x^4+d*x^2+c)/(b*x^2+a),x, algorithm="maxima")

[Out]

(b^3*c - a*b^2*d + a^2*b*e - a^3*f)*arctan(b*x/sqrt(a*b))/(sqrt(a*b)*b^3) + 1/15*(3*b^2*f*x^5 + 5*(b^2*e - a*b
*f)*x^3 + 15*(b^2*d - a*b*e + a^2*f)*x)/b^3

________________________________________________________________________________________

mupad [B]  time = 0.94, size = 96, normalized size = 0.96 \begin {gather*} x^3\,\left (\frac {e}{3\,b}-\frac {a\,f}{3\,b^2}\right )+x\,\left (\frac {d}{b}-\frac {a\,\left (\frac {e}{b}-\frac {a\,f}{b^2}\right )}{b}\right )+\frac {f\,x^5}{5\,b}+\frac {\mathrm {atan}\left (\frac {\sqrt {b}\,x}{\sqrt {a}}\right )\,\left (-f\,a^3+e\,a^2\,b-d\,a\,b^2+c\,b^3\right )}{\sqrt {a}\,b^{7/2}} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

int((c + d*x^2 + e*x^4 + f*x^6)/(a + b*x^2),x)

[Out]

x^3*(e/(3*b) - (a*f)/(3*b^2)) + x*(d/b - (a*(e/b - (a*f)/b^2))/b) + (f*x^5)/(5*b) + (atan((b^(1/2)*x)/a^(1/2))
*(b^3*c - a^3*f - a*b^2*d + a^2*b*e))/(a^(1/2)*b^(7/2))

________________________________________________________________________________________

sympy [A]  time = 1.15, size = 160, normalized size = 1.60 \begin {gather*} x^{3} \left (- \frac {a f}{3 b^{2}} + \frac {e}{3 b}\right ) + x \left (\frac {a^{2} f}{b^{3}} - \frac {a e}{b^{2}} + \frac {d}{b}\right ) + \frac {\sqrt {- \frac {1}{a b^{7}}} \left (a^{3} f - a^{2} b e + a b^{2} d - b^{3} c\right ) \log {\left (- a b^{3} \sqrt {- \frac {1}{a b^{7}}} + x \right )}}{2} - \frac {\sqrt {- \frac {1}{a b^{7}}} \left (a^{3} f - a^{2} b e + a b^{2} d - b^{3} c\right ) \log {\left (a b^{3} \sqrt {- \frac {1}{a b^{7}}} + x \right )}}{2} + \frac {f x^{5}}{5 b} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((f*x**6+e*x**4+d*x**2+c)/(b*x**2+a),x)

[Out]

x**3*(-a*f/(3*b**2) + e/(3*b)) + x*(a**2*f/b**3 - a*e/b**2 + d/b) + sqrt(-1/(a*b**7))*(a**3*f - a**2*b*e + a*b
**2*d - b**3*c)*log(-a*b**3*sqrt(-1/(a*b**7)) + x)/2 - sqrt(-1/(a*b**7))*(a**3*f - a**2*b*e + a*b**2*d - b**3*
c)*log(a*b**3*sqrt(-1/(a*b**7)) + x)/2 + f*x**5/(5*b)

________________________________________________________________________________________